﻿using StudentCourse;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace TestSchool
{
    
    
    /// <summary>
    ///This is a test class for StudentTest and is intended
    ///to contain all StudentTest Unit Tests
    ///</summary>
    [TestClass()]
    public class StudentTest
    {



        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


   
        [TestMethod()]
        public void CompareTest()
        {
            string name = "Milen";
            int facultyNumber = 55555;
            Student student1 = new Student(name, facultyNumber);
            Student student2 = new Student("Milen", 55555);
            Assert.AreEqual(student1.Compare(student1, student2), 0);
        }

        [ExpectedException(typeof(ArgumentNullException))]
        [TestMethod()]
        public void EmptyName()
        {
            string name = ""; // TODO: Initialize to an appropriate value
            int facultyNumber = 55555; // TODO: Initialize to an appropriate value
            Student student1 = new Student(name, facultyNumber); // TODO: Initialize to an appropriate value
        }

        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        [TestMethod()]
        public void IncorrectNumber()
        {
            string name = "fas"; // TODO: Initialize to an appropriate value
            int facultyNumber = 123; // TODO: Initialize to an appropriate value
            Student student1 = new Student(name, facultyNumber); // TODO: Initialize to an appropriate value
        }

    }
}
